{% extends 'activity/activity-layout.html.twig' %}
{% do script(['libs/ltc-sdk-client.js', 'replayactivity/js/create/index.js']) %}
{% set length = activity.length|default(0)|convert_minute_and_second %}
{% block activity_step %}
  <div class="tab-pane js-course-tasks-pane active js-step2-view">
    <form class="form-horizontal" id="step2-form" data-media-id="{{ activity.mediaId|default(null) }}">
      <div class="form-group">
        <div class="col-sm-2 control-label">
          <label for="title" class="control-label-required">{{ 'course.plan_task.activity_manage.title_name'|trans }}</label>
        </div>
        <div class="col-sm-10">
          <input id="title" class="form-control" type="text" name="title" value="{{ activity.title|default('') }}" >
          <div class="help-block">{{ 'course.plan_task.activity_manage.help_block'|trans }}</div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-2 control-label">
          <label for="media" class="style control-label-required">{{ 'course.plan_task.activity_manage.replay'|trans }}</label>
        </div>
        <div class="col-sm-10">
          {% include 'live-replay/replay-choose.html.twig' with {mediaType: 'replay','courseId': activity.fromCourseId|default(null), 'courseSetId': activity.fromCourseSetId|default(null), 'replayName': activity.title|default(null), originLessonId: activity.ext.origin_lesson_id|default(null) } %}
        </div>
      </div>
      <div class="form-group for-video-type" id="lesson-length-form-group">
        <div class="col-sm-2 control-label for-video-type">
          <label class="control-label-required">{{ 'course.plan_task.activity_manage.replay.time'|trans }}</label>
        </div>
        <div class="col-sm-10">
          <input class="form-control width-150 js-length" id="minute" type="text" name="minute"
                 value="{{ length.minute|default(null) }}"><span class="mhs">{{ 'site.date.minute'|trans }}</span><input
            class="form-control width-150 js-length" id="second" type="text" name="second"
            value="{{ length.second|default(null) }}">{{ 'site.date.second'|trans }}
          <input type="hidden" id="length" name="length" value="{{ activity.length|default(0) }}">
          <div class="help-block mtl">{{ 'course.live_replay.tips'|trans }}</div>
        </div>
      </div>
    </form>
  </div>
{% endblock %}